
import IslikeModel from '@/models/islike';
import IsLikeService from '@/services/islikeServic';
import { action, computed, observable } from 'mobx';

export default class IsLikeStore {

    // @observable
    // pageSize?: number = 4;
    // @observable
    // pageNumber?: number = 1;

    @observable
    IslikeList?: Array<IslikeModel>;

    @observable
    IslikeListLoading: boolean = false;

    @observable
    IslikeSave?: IslikeModel;
    @observable
    IslikeInfoLoading: boolean = false;

    @observable
    useId?: string
    @observable
    // galId?: string
    @observable
    isLike?: string

    @action
    async onFinish(galId?: number) {
        let option = {
            galId: galId
        };
        const result = await IsLikeService.save(option);
    };



    // @action
    // async saveMesaage(username: string, email: string, content: string) {
    //     let option = {
    //         username: this.username,
    //         email:this.email,
    //         content:this.content,

    //     };
    //     this.messageInfoLoading = true;
    //     this.messageSave = (await messageService.save(option)).dataInfo;
    //     this.messageInfoLoading = false;

    // }
    // @action
    // async listmessage() {
    //     this.IsLikeServiceListLoading = true;
    //     this.IsLikeServiceList = (await IsLikeService.list(this.pageNumber, this.pageSize)).dataList;
    //     this.IsLikeServiceListLoading = false;
    //     console.log(this.messageList);

    // }
}

export const isLikeStore = new IsLikeStore();
